/**
 * Created by likai on 17/3/4.
 */
// http://blockchain.info/ticker
var http = require('http')
http.get('http://blockchain.info/ticker', (res) => {
    console.dir(res.statusCode)
    var status = res.statusCode
    if (status === 200) {
        var result = ''
        res.on('data', (data) => {
            result += data
        })
        res.on('end', () => {
            console.log(result.toString())
        })
        res.on('error', (err) => {
            console.log(err)
        })
    }
})